<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<link type="text/css" rel="stylesheet" href="{TPL}css/NewTopFoot.css"  />
<link type="text/css" rel="stylesheet" href="{TPL}css/ShoppingCart.css"/>
<script src="{TPL}js/jquery-1.4.1.min.js" type="text/javascript"></script>
<script type="text/javascript" src="{TPL}js/ShoppingCart.js"></script>
<title>{lang My_Shopping_Cart}-{$cfg_site_name}</title>
</head>
<body>
{template 'header'}
<form id="form1" action="payconfirm.php" onsubmit="return thisPage.submitCheck();" method="post">

<div class="main">
<div class="center" id="pagemain">
  <div class="weizhi"> <a style="float: right; margin-right: 35px;" href="{url_m.php}">{lang Into_the_User_Center}</a> <b>{lang Location}：</b><a href="/">{lang index}</a><span>&gt;</span>{lang My_Shopping_Cart}</div>
{if !empty($temparray)}

  <div class="bt">
    <ul>
      <li class="w1">{lang Product_name_been_selected}</li>
      <li class="w2">{lang price}</li>
      <li class="w3">{lang Quantity}</li>
      <li class="w4">{lang total}</li>
      <li class="w5">
        <div id="yunfei" class="yunfei">
          <p> {lang Seller_order_goods_charge_shipping}!</p>
          <button onclick="$('#yunfei').hide();return false;"> </button>
        </div>
        <span>{lang Domestic_Shipping}</span><a onclick="$('#yunfei').show();" href="javascript:;"></a></li>
      <li class="w6">{lang notes}</li>
    </ul>
  </div>
  <div id="shoppingCartProduct" class="product">
  {loop $temparray $sname $value}
    <table>
      <tbody>
	   {loop $value $key $r}
        <tr id="li{$r['gid']}">
          <td class="b1"><input type="checkbox" checked="checked" value="{$r['gid']}" onclick="thisPage.accountAll()" name="gids[]">
          </td>
          <td class="b2"><a target="_blank" href="{$r['goodsurl']}"><img onerror="this.src='{TPL}images/noimg80.gif'" src="{$r['goodsimg']}"></a></td>
          <td class="b3"><p><a target="_blank" href="{$r['goodsurl']}">{$r['goodsname']}</a></p></td>
          <td class="b4">￥{$r['goodsprice']}</td>
          <td class="b5">
            <input type="text" value="{$r['goodsnum']}" onkeyup="value=value.replace(/[^\d]/g,'')" onblur="thisPage.updateNum({$r['gid']},this.value)" maxlength="4">
          </td>
          <td class="b6"><span>{eval if($r['type']==1)echo "￥".$r['goodsprice']*$r['goodsnum'];else echo "[{lang Generation_products}]"}</span> </td>
		  {if $key==0}
          <td rowspan="{eval echo count($value)}" class="b7" id="sj0">￥{$s[$sname]} </td>
		  {/if}
		  <td class="b8"><a title="{$r['goodsremark']}" onclick="thisPage.showRemarkPanel({$r['gid']},false,this,'{$r['goodsremark']}')" onmouseover="thisPage.showRemarkPanel({$r['gid']},true,this,'{$r['goodsremark']}')" onmouseout="thisPage.cleartoID(thisPage.toID);if($('.beizhu').length&gt;0)thisPage.outID.push(setTimeout(function() {thisPage.closeRemarkPanel();}, 500));" class="orange">{lang j_sc_addnote}</a> </td>
        </tr>
		{/loop}
        <tr>
          <td colspan="8" class="sj">{lang Business}：<a target="_blank" title="{$r['goodsseller']}" href="{$r['sellerurl']}">{$r['goodsseller']}</a><span>{lang Source_Site}：{$r['goodssite']}</span></td>
        </tr>
      </tbody>
    </table>
	{/loop}
	
	
    <div class="jisuan">
      <ul>
        <li><a onclick="$('input[type=checkbox]').attr('checked',true);thisPage.accountAll();" href="javascript:;"> {lang all}</a><span>-</span><a id="reSelete" onclick="$('input[type=checkbox]').each(function(){this.checked=!this.checked;});thisPage.accountAll();" href="javascript:;">{lang fselect}</a></li>
        <li>
          <input type="button" onclick="thisPage.del(this)" onmouseout="this.className='sc'" onmouseover="this.className='sc_'" value="{lang j_sc_del}" class="sc">
          <input type="button" onmouseout="this.className='tj'" onmouseover="this.className='tj_'" value="{lang j_sc_collect}" onclick="thisPage.addToFavorites(this);" class="tj">
        </li>
      </ul>
      <dl>
        <dt>{lang Total_goods_selected}<span id="totalProPrice">￥{$countdata['goodsmoney']}</span>&nbsp;+&nbsp;{lang Total_freight}<span id="totalFreight">￥{$countdata['sendmoney']}</span></dt>
        <dd> {lang need_pay_total_of}<span id="totalPrice">￥{$countdata['totalmoney']}
		<span style="font-size:12px;color:#599ED5;"> (S$ <script>var sb={$countdata['totalmoney']}/{$cfg_site_huilv};document.write(sb.toFixed(2))</script>)</span>
		</span></dd>
      </dl>
    </div>
    <div class="next">
      <p> <a target="_blank" href="{url_m.php?name=favorite}">{lang gt_my_favorites}</a></p>
      <input type="submit" onmouseout="this.className='in'" onmouseover="this.className='in_'" value="{lang j_sc_sub_daigou}" class="in">
    </div>
  </div>
  {else}
  
  
  <div class="nought">
              <h2>
                  {lang shopping_right_submit_purchasing_goods}！</h2>
              <p>
                  {lang You_guess_the_next}：<a href="{url_see.php}">{lang sb_see}</a></p>
              <div>
                    {lang Tips}：{lang Cart_empty_probably_on}！<a href="{url_user.php?action=login}">{lang Sign_now}</a></div>
              
  </div>
  {/if}
  
  
</div>
</div>
</form>

{template 'footer'}
</body>
</html>
